# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

inherit autotools darcs

DESCRIPTION="Nice is an implementation of the IETF's draft Interactice Connectivity Establishment standard (ICE). It provides GLib-based library, libnice."
HOMEPAGE="http://nice.freedesktop.org/"
EDARCS_LOCALREPO="nice"
EDARCS_REPOSITORY="http://projects.collabora.co.uk/darcs/nice/nice/"

LICENSE="LGPL-2.1"
KEYWORDS="~amd64 ~x86"
IUSE="doc test"
SLOT="0"

COMMON_DEPEND="=media-libs/gstreamer-0.10*
	>=media-libs/gstreamer-0.10.13
	=media-libs/gst-plugins-base-0.10*
	>=dev-libs/glib-2.6
	dev-libs/libxml2"

RDEPEND="${COMMON_DEPEND}
	>=media-plugins/gst-plugins-farsight-0.12.7
	!<net-voip/telepathy-stream-engine-0.5.0
	=media-libs/gst-plugins-good-0.10*
	=media-plugins/gst-plugins-ffmpeg-0.10*"

DEPEND="${COMMON_DEPEND}
	dev-util/pkgconfig
	doc? ( >=dev-util/gtk-doc-1.5 )
	test? ( >=dev-libs/check-0.9.4 )"

src_compile() {
	aclocal
	autoheader
	libtoolize --force
	autoconf
	automake --add-missing
	econf  \
		$(use_enable doc) \
		|| die "econf failed"
	emake || die "emake failed"
}

src_install() {
	emake install DESTDIR="${D}" || die "emake install failed"
	dodoc AUTHORS README TODO
}
